package com.scorpio.agentuser.vo;

import com.scorpio.common.utils.verification.AddGroup;
import com.scorpio.common.utils.verification.DefaultGroup;
import com.scorpio.common.utils.verification.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class CreateUpdateUserVo {
    @NotNull(message = "非法操作", groups = UpdateGroup.class)
    private Long id;

    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误", groups = AddGroup.class)
    @NotBlank(message = "手机号格式有误", groups = AddGroup.class)
    private String username;

    @NotBlank(message = "联系姓名/单位", groups = DefaultGroup.class)
    private String agentName;

    @NotBlank(message = "缺少电话号码", groups = DefaultGroup.class)
    private String phone;

    @NotNull(message = "请选择省份", groups = DefaultGroup.class)
    private Long provinceId;

    @NotNull(message = "请选择城市", groups = DefaultGroup.class)
    private Long cityId;

    private Long districtId;

    @NotBlank(message = "缺少详细地址", groups = DefaultGroup.class)
    private String address;

    //当前直推收益比例
    @NotNull(message = "百分比范围输入为0-100", groups = DefaultGroup.class)
    @DecimalMax(value = "100.00", message = "百分比范围输入为0-100", groups = DefaultGroup.class)
    @DecimalMin(value = "0.00", message = "百分比范围输入为0-100", groups = DefaultGroup.class)
    private Float directScale;

    //当前间推收益比例
    @NotNull(message = "百分比范围输入为0-100", groups = DefaultGroup.class)
    @DecimalMax(value = "100.00", message = "百分比范围输入为0-100", groups = DefaultGroup.class)
    @DecimalMin(value = "0.00", message = "百分比范围输入为0-100", groups = DefaultGroup.class)
    private Float indirectScale;

}
